<?php
namespace app\modules\film\models;


use app\common\base\ApiModel;

class FilmTicket extends ApiModel{

    public static function tableName(){
        return 'film_ticket';
    }


    public function rules()
    {
        return [
            [['film_id', 'amount_left', 'amount_sum'], 'required'],
            [['film_id', 'amount_left', 'amount_sum', 'status', 'show_times', 'video_hall'], 'integer'],
            ['open_time', 'date']
        ];
    }

    public function getFilmName(){
        return $this->hasMany(Film::class, ['id' => 'film_id']);
    }


}